package com.example.demo.mall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.mall.entity.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CategoryMapper extends BaseMapper<Category> {
    // 查询子分类
    List<Category> selectChildren(@Param("parentId") Long parentId);

    // 查询三级分类树
    List<Category> selectCategoryTree();
}

